package com.jgzx.feign;

import com.jgzx.common.R;
import com.jgzx.domain.IdDTO;
import com.jgzx.domain.vo.EnterprisePublicityVO;
import com.jgzx.service.EnterprisePublicityService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author libo
 * @date 2021/11/06 19:01
 */
@Api(tags = "企业宣传信息Feign", hidden = true)
@RestController
public class EnterprisePublicityFeignClientImpl implements EnterprisePublicityFeignClient {


    @Resource
    private EnterprisePublicityService enterprisePublicityService;

    @Override
    @PostMapping("/publicity/getEnterprisePublicityByEnterpriseId")
    public R<List<EnterprisePublicityVO>> getEnterprisePublicityByEnterpriseId(IdDTO idDTO) {
        return R.ok(enterprisePublicityService.getBaseMapper().listAll(idDTO.getId()));
    }
}
